/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.service.impl;

import com.techshop.dao.PhoneCodeStoreDao;
import com.techshop.model.PhoneCodeStore;
import com.techshop.model.PhoneCodeStoreId;
import com.techshop.service.PhoneCodeStoreService;
import java.util.List;

/**
 *
 * @author Hai-PC
 */
public class PhoneCodeStoreServiceImpl implements PhoneCodeStoreService
{    
    private PhoneCodeStoreDao phoneCodeStoreDao;

    @Override
    public boolean insert(PhoneCodeStore phoneCodeStore)
    {
        return this.getPhoneCodeStoreDao().insert(phoneCodeStore);
    }

    @Override
    public boolean update(PhoneCodeStore phoneCodeStore)
    {
        return this.getPhoneCodeStoreDao().update(phoneCodeStore);
    }

    /**
     * @return the phoneCodeStoreDao
     */
    public PhoneCodeStoreDao getPhoneCodeStoreDao()
    {
        return phoneCodeStoreDao;
    }

    /**
     * @param phoneCodeStoreDao the phoneCodeStoreDao to set
     */
    public void setPhoneCodeStoreDao(PhoneCodeStoreDao phoneCodeStoreDao)
    {
        this.phoneCodeStoreDao = phoneCodeStoreDao;
    }

    @Override
    public PhoneCodeStore getById(PhoneCodeStoreId phoneCodeStoreId)
    {
        return phoneCodeStoreDao.getById(phoneCodeStoreId);
    }

    @Override
    public PhoneCodeStore getByPhoneCodeAndStore(int phoneCodeId, int storeId)
    {
        return phoneCodeStoreDao.getByPhoneCodeAndStore(phoneCodeId, storeId);
    }

    @Override
    public List<PhoneCodeStore> getAll()
    {
        return phoneCodeStoreDao.getAll();
    }

    @Override
    public List<PhoneCodeStore> search(int storeId, int quantity)
    {
        return phoneCodeStoreDao.search(storeId, quantity);
    }
}